<?php
ini_set("display_errors", true);
error_reporting(E_ALL);

require_once 'config.php';
require_once 'loader.php';

session_start();

if (isset($_REQUEST['p'])) {
  $pagina = $_REQUEST['p'];
}
else{
  $pagina = "homePage";
}

$tela = new Tela();
$emailC = new EmailC();
$usuarioC = new UsuarioC();

switch ($pagina){
  case "novoEmail":
    $tela->novoEmail();
    break;   
    
  case "enviarEmail":
    $emailC->enviarEmail($_REQUEST);
    break;
  case "telaLogin":
    $tela->Login();
    break;
  case "login":
    $usuarioC->login($_REQUEST);
    break;
  
  
    
  default :
    $tela->homePage();
}



?>